package com.bdqn.zhao.controller;
import com.bdqn.zhao.service.CmBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpSession;
import java.util.Map;

/**
 * <p>
 * 账单信息表 前端控制器
 * </p>
 *
 * @author zhangsan
 * @since 2023-05-23
 */
@RestController
@RequestMapping("/cmBill")
public class CmBillController {
    @Autowired
    private CmBillService cmBillService;
    @GetMapping("/CmList")
    private Map<String,Object> SelAllJ(String billNumber, String billName, HttpSession session){
        Map<String, Object> map = cmBillService.SelAllJ(billNumber, billName);
        return map;
    }
    @DeleteMapping("/del/{id}")
    public Boolean DelJ(@PathVariable int id){
        Boolean flag;
        int i = cmBillService.DelJ(id);
        if (i>0){
            flag=true;
        }
        else
            flag=false;
        return flag;
    }
}

